package com.sx.product.service.impl;

import com.sx.product.mapper.productMapper;
import com.sx.product.service.ProductService;
import common.pojo.Products;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private productMapper productMapper;

    @Override
    public Products findById(long id) {
       return productMapper.selectById(id);
    }
    
    @Override
    public List<Products> findAll() {
        return productMapper.selectList(null);
    }
}
